package com.project2.controller;


import com.project2.bean.CommonData;
import com.project2.bean.PageBo;
import com.project2.bean.ResultVo;
import com.project2.bean.po.MarketLog;
import com.project2.mapper.MarketLogMapper;
import com.project2.service.MarketLogService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : bunnyupup
 * @description :
 * @date : Created in 2022/8/14 10:03
 */
@RestController
@RequestMapping("admin/log")
public class AdminLogController {

    @Autowired
    MarketLogService marketLogService;

    /**
     * 显示所有日志信息或根据管理员姓名查询对应日志
     * @param name
     * @param info
     * @return
     */
    @RequiresPermissions("admin:log:list")
    @RequestMapping("list")
    public ResultVo list(String name, PageBo info){
        CommonData<MarketLog> list = marketLogService.list(name, info);
        return ResultVo.ok(list);
    }
}
